package com.lhj.springboot.actuator.controller;

import com.lhj.springboot.actuator.component.MyHealthComponent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Author lhj
 * @Date 2024/7/24 9:33
 */
@RestController
public class HelloController {
    
    @Autowired
    MyHealthComponent healthComponent;
    
    @GetMapping("/hello")
    public ResponseEntity<?> hello() {
        return healthComponent.helloCount();
    }
    
}
